// 轮播图Banner相关业务代码
import { getBanner } from '@/api/home'
import { ref, onMounted } from "vue"

export function useBanner() {
    // 获取轮播图
    const bannerList = ref([])
    const getBannerList = () => {
        getBanner(2).then(res => {
            bannerList.value = res.result
        })
    }
    onMounted(() => getBannerList())
    return {
        bannerList
    }
}
